package com.study.enums;

/**
 * @Description: TODO
 * @Author: csc
 * @Date: 2024/12/2 14:55
 * @Version: 1.0
 **/
public enum MessageType {

    DEVICE_CONNECTED,
    DEVICE_DISCONNECTED,
    DEVICE_DATA;

    public static MessageType getMessageType(String type) {
        for (MessageType value : MessageType.values()) {
            if (value.name().equals(type)) {
                return value;
            }
        }
        return null;
    }

}
